home *** CD-ROM | disk | FTP | other *** search
Text File | 1995-11-08 | 5.4 KB | 176 lines | [TEXT/MPS ] |
- //========================================================================================
- //
- // File: FWPresen.h
- // Release Version: $ 1.0d11 $
- //
- // Copyright: © 1995 by Apple Computer, Inc., all rights reserved.
- //
- //========================================================================================
-
- #ifndef FWPRESEN_H
- #define FWPRESEN_H
-
- // ----- OS Layer -----
-
- #ifndef FWRECT_H
- #include "FWRect.h"
- #endif
-
- // ----- Foundation Includes -----
-
- #ifndef FWRUNTYP_H
- #include "FWRunTyp.h"
- #endif
-
- // ----- OpenDoc -----
-
- #ifndef _ODTYPES_
- #include <ODTypes.h>
- #endif
-
- #if FW_LIB_EXPORT_PRAGMAS
- #pragma lib_export on
- #endif
-
- //========================================================================================
- // Forward Declarations
- //========================================================================================
-
- class FW_CLASS_ATTR ODShape;
- class FW_CLASS_ATTR ODPart;
- class FW_CLASS_ATTR ODFrame;
- class FW_CLASS_ATTR ODFacet;
-
- class FW_CLASS_ATTR FW_CPart;
- class FW_CLASS_ATTR FW_CSelection;
- class FW_CLASS_ATTR FW_CPrivOrderedCollection;
- class FW_CLASS_ATTR FW_CFrame;
- class FW_CLASS_ATTR FW_MProxy;
- class FW_CLASS_ATTR FW_CViewAs;
- class FW_CLASS_ATTR FW_CViewAsThumbnail;
- class FW_CLASS_ATTR FW_CViewAsSmallIcon;
- class FW_CLASS_ATTR FW_CViewAsLargeIcon;
-
- //========================================================================================
- // class FW_CPresentation
- //========================================================================================
-
- class FW_CLASS_ATTR FW_CPresentation
- {
- public:
- FW_DECLARE_CLASS
-
- friend class FW_CLASS_ATTR FW_CPresentationFrameIterator;
-
- //----------------------------------------------------------------------------------------
- // Constructors/Destructors
- //
- public:
- FW_CPresentation(Environment *ev,
- FW_CPart* thePart,
- FW_CSelection* selection,
- ODTypeToken presentationType,
- FW_Boolean sameViewTypeForEmbeddedFrames = TRUE);
- virtual ~FW_CPresentation();
-
- //----------------------------------------------------------------------------------------
- // New API
- //
- public:
- // ----- Invalidate/Validate -----
- void Invalidate(Environment *ev, ODShape* invalidShape = NULL, ODFacet* skipFacet = NULL);
- void Validate(Environment *ev, ODShape* validShape = NULL, ODFacet* skipFacet = NULL);
-
- void Invalidate(Environment* ev, const FW_CRect& invalidRect, ODFacet* skipFacet = NULL);
- void Validate(Environment* ev, const FW_CRect& validRect, ODFacet* skipFacet = NULL);
-
- // ----- Getters -----
- FW_CSelection* GetSelection(Environment* ev) const;
- FW_CPart* GetPart(Environment* ev) const;
- ODTypeToken GetPresentationType(Environment* ev) const;
-
- unsigned long CountFrame(Environment* ev) const;
-
- // ----- Embedding -----
- virtual void Embed(Environment *ev,
- ODPart *odEmbeddedPart,
- ODFrame* odEmbeddedFrame, // Can be null
- FW_MProxy* proxy,
- ODShape* frameShape,
- ODTypeToken viewType,
- ODTypeToken presentationType,
- ODID frameGroupID,
- FW_Boolean subFrame);
-
- // ----- View In Window Frame -----
- ODID ViewInWindow(Environment* ev, FW_CFrame* sourceFrame, ODFacet* sourceFacet);
-
- // ----- View As -----
- FW_CViewAs* AcquireViewAs(Environment* ev, FW_CFrame* frame, ODTypeToken viewAs);
- void ReleaseViewAs(Environment* ev, FW_CViewAs* viewAs);
-
- // ----- Show Part Info -----
- FW_Boolean UseSameViewTypeForEmbeddedFrames(Environment* ev) const;
-
- //----------------------------------------------------------------------------------------
- // Internal Use Only
- //
- public:
- void PrivAddFrame(Environment *ev, FW_CFrame* frame);
- void PrivRemoveFrame(Environment *ev, FW_CFrame* frame);
-
- //----------------------------------------------------------------------------------------
- // Data Members
- //
- private:
- FW_CPart* fPart;
- FW_CSelection* fSelection;
- FW_CPrivOrderedCollection* fFrames;
- ODTypeToken fPresentationType;
-
- FW_CViewAsThumbnail* fViewAsThumbnail;
- FW_CViewAsSmallIcon* fViewAsSmallIcon;
- FW_CViewAsLargeIcon* fViewAsLargeIcon;
-
- FW_CFrame* fViewInWindowFrame;
-
- FW_Boolean fSameViewTypeForEmbeddedFrames;
- };
-
- //----------------------------------------------------------------------------------------
- // FW_CPresentation::GetSelection
- //----------------------------------------------------------------------------------------
- inline FW_CSelection* FW_CPresentation::GetSelection(Environment*) const
- {
- return fSelection;
- }
-
- //----------------------------------------------------------------------------------------
- // FW_CPresentation::GetSelection
- //----------------------------------------------------------------------------------------
- inline FW_CPart* FW_CPresentation::GetPart(Environment*) const
- {
- return fPart;
- }
-
- //----------------------------------------------------------------------------------------
- // FW_CPresentation::GetPresentationType
- //----------------------------------------------------------------------------------------
- inline ODTypeToken FW_CPresentation::GetPresentationType(Environment*) const
- {
- return fPresentationType;
- }
-
- //----------------------------------------------------------------------------------------
- // FW_CPresentation::UseSameViewTypeForEmbeddedFrames
- //----------------------------------------------------------------------------------------
- inline FW_Boolean FW_CPresentation::UseSameViewTypeForEmbeddedFrames(Environment*) const
- {
- return fSameViewTypeForEmbeddedFrames;
- }
-
- #if FW_LIB_EXPORT_PRAGMAS
- #pragma lib_export off
- #endif
-
- #endif